package cn.edu.csust.tysp.backend.service.impl;

import cn.edu.csust.tysp.backend.dao.SheetMapper;
import cn.edu.csust.tysp.backend.domain.Sheet;
import cn.edu.csust.tysp.backend.service.SheetService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: MusicSheetServiceImpl
 * @Author: XijiaoZheng
 * @E-mail: 2516299639@qq.com
 * @Date: 2021/5/9 16:14
 * @Version: V1.0
 * @Description: 对该类的描述
 */

@Service
public class SheetServiceImpl implements SheetService {


    @Autowired
    SheetMapper sheetMapper;

    @Override
    public PageInfo<Sheet> selectSheet(String sheetName, String instrumentType) {
        List<Sheet> sheets=sheetMapper.selectSheet(sheetName,instrumentType);
        return new PageInfo<>(sheets);
    }

    @Override
    public PageInfo<Sheet> selectByName(String sheetName) {
        List<Sheet> sheets= sheetMapper.selectByName(sheetName);
        return new PageInfo<>(sheets);
    }
}
